package com.jr.controller;

import com.jr.entry.User;
import com.jr.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/")
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("register")
    public Boolean register(User user) {
        return userService.register(user);
    }

    @RequestMapping("login")
    public User login(User user) {
        return userService.login(user);
    }

    @RequestMapping("updatePassword")
    public Boolean updatePassword(User user) {
        return userService.updatePassword(user);
    }
    @RequestMapping("selectUser")
    public boolean selectUser(User user) {
       return userService.selectUser(user);
    }
}